package com.wondersgroup.wuhan_demo.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.widget.Toast;

import com.wondersgroup.wuhan_demo.MyApplication;
import com.wondersgroup.wuhan_demo.R;
import com.wondersgroup.wuhan_demo.ui.DeptSelectFragment;
import com.wondersgroup.wuhan_demo.ui.DoctorSelectFragment;

/**
 * Created by liyaqing on 2018/5/9 0009.
 */

public class BaseFragment extends Fragment {
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    protected void addFragment(Fragment fragment){
        getActivity().getSupportFragmentManager().beginTransaction().hide(this)
                .add(R.id.content, fragment).addToBackStack(null).commit();
    }

    protected void toast(final String msg) {
        Toast.makeText(MyApplication.getContextObject(), msg, Toast.LENGTH_SHORT).show();
    }
}
